Example: Content-based Discovery

//Construct search filter and constraints
filter = new SearchFilter("(&(market=NASDAQ) (updateFreq<=?))");
filter.setParameter(0, new Integer(300));
constraints = new SearchConstraints();

SearchEnumeration matches = 
   ctx.search("service/stockQuotes",filter, constraints);
while (matches.hasMoreElements())  {
   SearchItem item = matches.next();
   Attribute serverLocation = item.getAttribute("location");
   ...
   }
...

Return to Tracks